<template>
    <div>
        <van-nav-bar  title="详情" left-arrow @click-left="$router.go(-1)" />
        <div class="instructions">
            <div class="instruc-map">{{title}}</div>
            <div class="data">{{updateDate}}</div>
            <div class="title-city" v-html="content"></div>
        </div>
    </div>
</template>
<script>
import apiHttp from '../../../../../api/index'
import { Toast } from 'vant';

export default {
    data(){
        return{
            id:this.$route.query.id ? this.$route.query.id: '',  // 判断页面是否存在id
            title:"",
            content:"",
            updateDate:""
        }
    },
    mounted(){
        this.findInform()
        
    },
    methods:{
        findInform(){
            let params ={
                informId:this.id
            }
            apiHttp.comIndex.findInform(params,resp=>{
                if(resp.resultCode == '000000'){
                    this.title=resp.data.inform.title  
                    this.content = resp.data.inform.content
                    this.updateDate=resp.data.inform.updateDate  
                }else{
                    Toast(resp.resultMsg)
                }
            })
        }
    },
}
</script>
<style scoped>
.instructions{
    width: 90%;
    margin: 0 auto;
    margin-bottom: 1rem;
}
.instruc-map{
    text-align: center;
    color: #000000;
    font-size: 0.8rem;
    margin: 0.8rem 0 0.5rem 0;
}
.data{
    font-size: 0.7rem;
    color: #999999;
    margin-top: 0.2rem;
    line-height: 24px;
}
.title-city{
  font-size: 14px
}
</style>

